const http = uni.$u.http

const api = {
	list: '/store/list',
	detail: '/store/detail',
	goodslist: '/store/goodslist',
	zan: '/store/zan',
	visitorlist: '/store/visitorlist',
}

export const list = (config) => http.get(api.list, {
	custom: {
		loading: false,
		toast: false
	},
	
	...config
})

export const detail = (config) => http.get(api.detail, {
	custom: {
		toast: false
	},
	
	...config
})

export const goodslist = (config) => http.get(api.goodslist, {
	custom: {
		toast: false,
		loading: false
	},
	
	...config
})

export const zan = (config) => http.get(api.zan, {
	custom: {
		toast: false,
		loading: false,
		catch: true
	},
	
	...config
})

export const visitorlist = (config) => http.get(api.visitorlist, {
	custom: {
		loading: false,
		toast: false
	},
	
	...config
})